package com.wanxi.myfor;

public class WaterXianFlower {
    public static void main(String[] args) {
//        246    2*2*2 +4*4*4+6*6*6==246


        int count = 0;
        for (int i = 100; i <= 999; i++) {
            int aa = 1;
            ++aa;
            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100 % 10;
            if ((ge * ge * ge + shi * shi * shi + bai * bai * bai) == i) {
                System.out.println(i + "为水仙花数");
                count++;
            }
        }
//        System.out.println(aa);
//        System.out.println(i);
        System.out.println(count);
    }
}
